How to update table based on another table values in SQL

welcome to shbcf.ru